<template>
    <div>
       <button @click="showInfo">输出信息</button>
        <P>{{ message }}</P> 
    </div>
</template>


<script setup>
import {ref} from 'vue'
const message = ref('')
const showInfo = ()=>{message.value='欢迎来到Vue.js的世界!'}
</script>